/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.nju.zyy.share;

/**
 * 
 * @author yingyzhang
 */
public abstract class IntGenerator {
	private volatile boolean canceled = false;

	public abstract int next();

	// Allow this to be canceled:
	public void cancel() {
		canceled = true;
	}

	public boolean isCanceled() {
		return canceled;
	}
}
